<div>
    <p>
        Adds one or more badges to the current Pipeline build.
        Badges are symbols or icons with an optional text message and an optional clickable hyperlink.
        Badges are often used to provide a visual indicator of additional status information about a Pipeline build.
        Badges added by <code>addBadge</code> are displayed in the build history of the Pipeline job.
    </p>

    <p>
        The plugin supports symbols from the <a href="https://ionic.io/ionicons">ionicons library</a> through the <a href="https://plugins.jenkins.io/ionicons-api/">ionicons-api-plugin</a>.
        More symbols can be added by installing additional plugins, such as <a href="https://plugins.jenkins.io/font-awesome-api">font-awesome-api-plugin</a> or <a href="https://plugins.jenkins.io/custom-folder-icon">custom-folder-icon-plugin</a>.
        Symbols from plugins are referenced as "symbol-<i>icon-name</i> plugin-<i>plugin-name</i>" and Jenkins Core icons as "icon-<i>icon-name</i>" or "symbol-<i>icon-name</i>".
        For example, the following are all valid references to symbols:
    <ul>
        <li><code>addBadge icon: 'symbol-alert-circle-outline plugin-ionicons-api', text: 'This is an alert symbol'</code></li>
        <li><code>addBadge icon: 'symbol-bar-chart-filled plugin-ionicons-api', text: 'This is a bar chart symbol'</code></li>
        <li><code>addBadge icon: 'symbol-battery-half-sharp plugin-ionicons-api', text: 'This is a half filled battery symbol'</code></li>
        <li><code>addBadge icon: 'symbol-emoji_sloth plugin-emoji-symbols-api', text: 'This is a sloth symbol'</code></li>
        <li><code>addBadge icon: 'symbol-solid/flag-checkered plugin-font-awesome-api', text: 'This is a checkered flag from font-awesome. Note the slash between the icon family and the name.</code></li>
        <li><code>addBadge icon: 'symbol-cube', text: 'This is a Jenkins Core symbol'</code></li>
        <li><code>addBadge icon: 'icon-gear', text: 'This is a Jenkins Core icon'</code></li>
    </ul>
    </p>

    <p>
        The plugin allows you to also reference images from within Jenkins as well as relative and remote URL:
    <ul>
        <li><code>addBadge icon: '/jenkins.png', text: 'This is a relative image'</code></li>
        <li><code>addBadge icon: 'https://foo.bar/icon.png', text: 'This is a remote icon'</code></li>
        <li><code>addBadge icon: 'blue.png', text: 'This is a icon from Jenkins'</code></li>
    </ul>
    </p>

    <p>
        The plugin includes icons as GIF images and also supports the <a href="https://github.com/jenkinsci/jenkins/tree/master/war/src/main/webapp/images/16x16">16x16 icons</a> that are offered by Jenkins.
        These icons are listed in the <a href="https://plugins.jenkins.io/badge/#plugin-content-icons">plugin documentation</a> and are referenced as "<i>image-name</i>.gif".
        For example, the following are all valid references to icons included with the plugin:
    <ul>
        <li><code>addBadge icon: 'completed.gif', text: 'This is a completed symbol'</code></li>
        <li><code>addBadge icon: 'success.gif', text: 'This is a success icon'</code></li>
        <li><code>addBadge icon: 'warning.gif', text: 'This is a warning icon'</code></li>
    </ul>
    </p>

    <strong><a id="badge-with-completed">Example: Badge with completed icon</a></strong>
    <p>
        The following example adds a "completed" checkmark icon with the text, "This is completed":
        <pre><code>addBadge icon: 'completed.gif', text: 'This is completed'</code></pre>
    </p>

    <strong><a id="badge-with-alarm">Example: Badge with alarm symbol</a></strong>
    <p>
        The following example adds an alarm symbol with the text, "This is alarming":
        <pre><code>addBadge icon: 'symbol-alarm-outline plugin-ionicons-api', text: 'This is alarming'</code></pre>
    </p>

    <strong><a id="badge-with-red-bug-and-link">Example: Badge with red bug symbol</a></strong>
    <p>
        The following example adds a red bug symbol with the text, "This is a red bug with a link", and a link:
        <pre><code>addBadge icon: 'symbol-bug plugin-ionicons-api', text: 'This is a red bug with a link', style: 'color: red', link: 'https://issues.jenkins.io/browse/JENKINS-59646', target: '_blank'</code></pre>
    </p>

    <strong><a id="badge-text-with-css-class">Example: Text badge with CSS styles</a></strong>
    <p>
        The following example adds text only badge that uses included CSS styles:
    <pre><code>
    // Add shaded background color with rounded corners
    addBadge text: 'ok', style: 'color: var(--success-color)', cssClass: 'badge-text--background'
    // Add additional border around badge
    addBadge text: '1.0.0', cssClass: 'badge-text--background badge-text--bordered'
    </code></pre>
    </p>

</div>
